<tr>
<?
$intro = explode('-done-', $act['a_intro']);

?>
<td valign="top"><h4><?= $act['a_name'] ?></h4>
<?

if ($preMet)
{
  if ($act['h_key'] != '')
  {
    ?><div class="quest_done_text"><?= nl2br(actorTextStory($intro[1])) ?></div><?    
  }
  else
  {
  ?>
    <div class="quest_text"><?= nl2br(actorTextStory($intro[0])) ?></div>
    <?
    if ($playerIsReady && $ap >= $apCost)
    {  
    ?><input type="button" name="qbutton" 
      value="<?= getDefault($action_stats['button'], 'Do Quest') ?>" onclick="document.location.replace('<?= actionUrl('quest', 'game', 'id='.$act['a_key']) ?>');">
    <?
    }
    else
    {
      if ($ap < $apCost) print('<b style="color: gray">You need more AP to try that!</b>');
    }
  }
}
else
{
?>
  To do this...
    <div class="action_prereqs">
      <?= $prereqs ?>
    </div>
<?
}
?></td><td valign="top">
<?
  if ($act['a_icon'] != '')
    print('<img src="img/'.$act['a_icon'].'.png" width="64" align="right"/>');
?></td>
</tr>